<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员登录页|私教预约系统</title>
    <link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" />
    <link rel="stylesheet" type="text/css" href="../css/normalize.css" />
    <link rel="stylesheet" type="text/css" href="../css/default.css">
    <link rel="stylesheet" type="text/css" href="../css/styles.css">
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/materialdesignicons.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.min.css" />
    <link href="../css/coming-soon.min.css" rel="stylesheet">

</head>
<body>

<div class="overlay"></div>
<video playsinline="playsinline" autoplay="autoplay" muted="muted" loop="loop">
    <source src="../mp4/exercise.mp4" type="video/mp4">
</video>

<div class="masthead">
    <div class="container h-100">
        <div class="row h-100">
            <div class="col-12 my-auto">
                <div class="masthead-content text-white py-5 py-md-0">
                    <p></p>
                    <div class="htmleaf-container">
                        <div class="login-wrap">
                            <div class="login-html">
                                <input id="tab-1" type="radio" name="tab" class="sign-in" checked><label for="tab-1" class="tab">管理员，请登录</label>
                                <input id="tab-2" type="radio" name="tab" class="sign-up"><label for="tab-2" class="tab"></label>
                                <div class="login-form">
                                    <div class="sign-in-htm">
                                        <div class="group">
                                            <label for="user_in" class="label">管理员名</label>
                                            <input id="user_in" type="text" class="input" >
                                        </div>
                                        <div class="group">
                                            <label for="pass_in" class="label">密码</label>
                                            <input id="pass_in" type="password" class="input" data-type="password">
                                        </div>
                                        <div class="group">
                                            <input id="check" type="checkbox" class="check" checked>
                                            <label for="check"><span class="icon"></span> 登录时保存</label>
                                        </div>
                                        <div class="group">
                                            <input id="signin" type="submit" class="button" value="登录">
                                        </div>
                                    </div>
                                    <div class="sign-up-htm">
                                        <div class="group">
                                            <label for="user_up" class="label">Username</label>
                                            <input id="user_up" type="text" class="input">
                                        </div>
                                        <div class="group">
                                            <label for="pass_up" class="label">Password</label>
                                            <input id="pass_up" minlength="6" required type="password" class="input" data-type="password">
                                        </div>
                                        <div class="group">
                                            <label for="pass_a" class="label">Repeat Password</label>
                                            <input id="pass_a" type="password" class="input" data-type="password">
                                        </div>
                                        <!--<div class="group">
                                            <label for="pass_e" class="label">Email Address</label>
                                            <input id="pass_e" type="text" class="input">
                                        </div>-->
                                        <div class="group">
                                            <input id="signup" type="submit" class="button" value="Sign Up">
                                        </div>
                                        <div class="hr"></div>
                                        <div class="foot-lnk">
                                            <label for="tab-1">Already Member?</label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


</body>
<script src="../js/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script type="text/javascript">
    jQuery(document).ready(function(){
        jQuery("#signin").click(function () {
            let name = jQuery("#user_in").val();
            let pwd=jQuery("#pass_in").val();

            jQuery.post("/admin_signIn", {"adminName":name,"adminPassword":pwd}, function(rst) {

                if(rst === "登录成功"){
                    $.cookie('adminname', name);
                    window.location.replace("adminMainPage.html");
                }
                else{
                    alert(rst);
                }
            });
        })
    });

</script>
</html>